<?php

namespace App\Http\Controllers\Home;

use App\Models\Article;
use App\Models\Link;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

class IndexController extends Controller
{

    public function index()
    {
        // 资讯
        $news = Article::latest()->take(3)->get();
        //友情链接
        $links = Link::all();
        return view('home.index',compact('news','links'));
    }

    public function about()
    {
        return view('home.about');
    }



}
